package com.kashow.bean.live.invite;

import android.text.TextUtils;

import com.kashow.bean.BaseBean;

/**
 * Created by yybs on 16/11/3.
 */

public class LiveInvite extends BaseBean {

    /**
     * user : {"headimgurl":"http://wx.qlogo.cn/mmopen/JeRaguctqTegn3ziaaWeicDHP6t6Buz4PH9AicDESdViafO4nKy6T20AxRiabYqvGtsAc3qaAvUWiclHcicaDLQpPqibnOknhLmAMBxu/0","nickname":"沈菱","_id":61,"openid":"ohHipv5unz32BnKmZnHS1wMBgWDU","relation":57,"wxUserInfo":{"openid":"ohHipv5unz32BnKmZnHS1wMBgWDU","nickname":"沈菱","sex":2,"city":"Shenzhen","province":"Guangdong","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/JeRaguctqTegn3ziaaWeicDHP6t6Buz4PH9AicDESdViafO4nKy6T20AxRiabYqvGtsAc3qaAvUWiclHcicaDLQpPqibnOknhLmAMBxu/0","updatedAt":"2016-11-23T01:33:13.000Z"},"createdAt":"2016-11-23T01:33:13.215Z","isSub":false,"sex":0,"balance":0,"score":0,"level":1,"isTeacher":false}
     * count : 76
     */

    private UserBean user;
    private int count;

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    public static class UserBean {
        /**
         * headimgurl : http://wx.qlogo.cn/mmopen/JeRaguctqTegn3ziaaWeicDHP6t6Buz4PH9AicDESdViafO4nKy6T20AxRiabYqvGtsAc3qaAvUWiclHcicaDLQpPqibnOknhLmAMBxu/0
         * nickname : 沈菱
         * _id : 61
         * openid : ohHipv5unz32BnKmZnHS1wMBgWDU
         * relation : 57
         * wxUserInfo : {"openid":"ohHipv5unz32BnKmZnHS1wMBgWDU","nickname":"沈菱","sex":2,"city":"Shenzhen","province":"Guangdong","country":"China","headimgurl":"http://wx.qlogo.cn/mmopen/JeRaguctqTegn3ziaaWeicDHP6t6Buz4PH9AicDESdViafO4nKy6T20AxRiabYqvGtsAc3qaAvUWiclHcicaDLQpPqibnOknhLmAMBxu/0","updatedAt":"2016-11-23T01:33:13.000Z"}
         * createdAt : 2016-11-23T01:33:13.215Z
         * isSub : false
         * sex : 0
         * balance : 0
         * score : 0
         * level : 1
         * isTeacher : false
         */

        private String headimgurl;
        private String nickname;
        private int _id;
        private String openid;
        private int relation;
        private WxUserInfoBean wxUserInfo;
        private String createdAt;
        private boolean isSub;
        private int sex;
        private int balance;
        private int score;
        private int level;
        private boolean isTeacher;

        public String getNickname() {
            if (TextUtils.isEmpty(nickname) && wxUserInfo!= null) {
                nickname = wxUserInfo.getNickname();
            }
            return nickname;
        }

        public void setNickname(String nickname) {
            this.nickname = nickname;
        }

        public String getHeadimgurl() {
            if (TextUtils.isEmpty(headimgurl) && wxUserInfo != null) {
                headimgurl = wxUserInfo.getHeadimgurl();
            }
            return headimgurl;
        }

        public void setHeadimgurl(String headimgurl) {
            this.headimgurl = headimgurl;
        }

        public int get_id() {
            return _id;
        }

        public void set_id(int _id) {
            this._id = _id;
        }

        public String getOpenid() {
            return openid;
        }

        public void setOpenid(String openid) {
            this.openid = openid;
        }

        public int getRelation() {
            return relation;
        }

        public void setRelation(int relation) {
            this.relation = relation;
        }

        public WxUserInfoBean getWxUserInfo() {
            return wxUserInfo;
        }

        public void setWxUserInfo(WxUserInfoBean wxUserInfo) {
            this.wxUserInfo = wxUserInfo;
        }

        public String getCreatedAt() {
            return createdAt;
        }

        public void setCreatedAt(String createdAt) {
            this.createdAt = createdAt;
        }

        public boolean isIsSub() {
            return isSub;
        }

        public void setIsSub(boolean isSub) {
            this.isSub = isSub;
        }

        public int getSex() {
            return sex;
        }

        public void setSex(int sex) {
            this.sex = sex;
        }

        public int getBalance() {
            return balance;
        }

        public void setBalance(int balance) {
            this.balance = balance;
        }

        public int getScore() {
            return score;
        }

        public void setScore(int score) {
            this.score = score;
        }

        public int getLevel() {
            return level;
        }

        public void setLevel(int level) {
            this.level = level;
        }

        public boolean isIsTeacher() {
            return isTeacher;
        }

        public void setIsTeacher(boolean isTeacher) {
            this.isTeacher = isTeacher;
        }

        public static class WxUserInfoBean {
            /**
             * openid : ohHipv5unz32BnKmZnHS1wMBgWDU
             * nickname : 沈菱
             * sex : 2
             * city : Shenzhen
             * province : Guangdong
             * country : China
             * headimgurl : http://wx.qlogo.cn/mmopen/JeRaguctqTegn3ziaaWeicDHP6t6Buz4PH9AicDESdViafO4nKy6T20AxRiabYqvGtsAc3qaAvUWiclHcicaDLQpPqibnOknhLmAMBxu/0
             * updatedAt : 2016-11-23T01:33:13.000Z
             */

            private String openid;
            private String nickname;
            private int sex;
            private String city;
            private String province;
            private String country;
            private String headimgurl;
            private String updatedAt;

            public String getOpenid() {
                return openid;
            }

            public void setOpenid(String openid) {
                this.openid = openid;
            }

            public String getNickname() {
                return nickname;
            }

            public void setNickname(String nickname) {
                this.nickname = nickname;
            }

            public int getSex() {
                return sex;
            }

            public void setSex(int sex) {
                this.sex = sex;
            }

            public String getCity() {
                return city;
            }

            public void setCity(String city) {
                this.city = city;
            }

            public String getProvince() {
                return province;
            }

            public void setProvince(String province) {
                this.province = province;
            }

            public String getCountry() {
                return country;
            }

            public void setCountry(String country) {
                this.country = country;
            }

            public String getHeadimgurl() {
                return headimgurl;
            }

            public void setHeadimgurl(String headimgurl) {
                this.headimgurl = headimgurl;
            }

            public String getUpdatedAt() {
                return updatedAt;
            }

            public void setUpdatedAt(String updatedAt) {
                this.updatedAt = updatedAt;
            }
        }
    }
}
